﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace B.S.BaseData.suyuan.InforStances.Migrations
{
    /// <inheritdoc />
    public partial class swo : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "S_Aquaculture",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    variety = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    source = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Number = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    brand = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HealthCareMethodType = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HealthCareMethod = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FeedingPersonInCharge = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SlaughterDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Farm = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PersonInCharge = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductionBatch = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_S_Aquaculture", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "S_EnterpriseInfo",
                columns: table => new
                {
                    EnterpriseInfoId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FarmName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Slaughterhouse = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProcessingPlant = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ResponsiblePerson = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    LivestockCount = table.Column<int>(type: "int", nullable: true),
                    Province = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    City = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    County = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    EstablishDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CompanyProfile = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Batch = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_S_EnterpriseInfo", x => x.EnterpriseInfoId);
                });

            migrationBuilder.CreateTable(
                name: "S_Imaggess",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    batch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ImagessType = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ImagessName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ImagessUrl = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_S_Imaggess", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "S_Information",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ShopName = table.Column<int>(type: "int", nullable: false),
                    batch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ShelfLife = table.Column<int>(type: "int", nullable: false),
                    ProductionLicense = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Manufacturers = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    image = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    completeness = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Status = table.Column<int>(type: "int", nullable: false),
                    Isdel = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_S_Information", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "S_shopMondels",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ShopName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_S_shopMondels", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "S_slaughter",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    batch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    weight = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    slaughterTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_S_slaughter", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "S_vendor",
                columns: table => new
                {
                    ID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Team = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Head = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductionBatches = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    rawMaterial = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Accessories = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    additive = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PackagingMaterials = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_S_vendor", x => x.ID);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "S_Aquaculture");

            migrationBuilder.DropTable(
                name: "S_EnterpriseInfo");

            migrationBuilder.DropTable(
                name: "S_Imaggess");

            migrationBuilder.DropTable(
                name: "S_Information");

            migrationBuilder.DropTable(
                name: "S_shopMondels");

            migrationBuilder.DropTable(
                name: "S_slaughter");

            migrationBuilder.DropTable(
                name: "S_vendor");
        }
    }
}
